package com.jianyun.jyzs.widget.badge;

import android.content.Context;
import android.content.Intent;


public class VivoBadgeHandler implements IBadgeHandler {

    private Context context;

    public VivoBadgeHandler(Context context) {
        this.context = context;
    }

    @Override
    public void updateBadgeCount(int count) {
        Intent intent = new Intent("launcher.action.CHANGE_APPLICATION_NOTIFICATION_NUM");
        intent.putExtra("packageName", context.getPackageName());
        String launchClassName = context.getPackageManager().getLaunchIntentForPackage(context.getPackageName()).getComponent().getClassName();
        intent.putExtra("className", launchClassName);
        intent.putExtra("notificationNum", count);
        context.sendBroadcast(intent);
    }
}
